package com.shop.zkmall.app.controller.a.live;

import com.shop.zkmall.app.domain.res.PlayUrlVO;

public class TxPlayUrlUtil {

    private static final String PLAY_DOMAIN = "play.example.com";
    private static final String APP_NAME = "live";

    /**
     * 获取播放地址（包含 FLV、HLS、WebRTC）
     */
    public static PlayUrlVO buildPlayUrls(String streamName) {

        PlayUrlVO vo = new PlayUrlVO();

        vo.setFlv("https://" + LiveConstant.PLAY_DOMAIN + "/" + APP_NAME + "/" + streamName + ".flv");
        vo.setHls("https://" + LiveConstant.PLAY_DOMAIN + "/" + APP_NAME + "/" + streamName + ".m3u8");
        vo.setWebrtc("webrtc://" + LiveConstant.PLAY_DOMAIN + "/" + APP_NAME + "/" + streamName);

        return vo;
    }
}
